'use strict';

const migrationModels = [
    // 'Pages',
];

module.exports = function(app) {
  var mysqlDs = app.dataSources.mysqlds_t0201;
  var Models = app.models();
  // first autoupdate the `Author` model to avoid foreign key constraint failure
  Models.forEach(model=>{
      if (!migrationModels.includes(model.modelName)) {
        mysqlDs.autoupdate(model.modelName, function(err) {
            if (err) throw err;
            // console.log('\nAutoupdated table `Author`.');
        });
      }
  });
};
